<div class="editcate_top">
    <h2>Thêm trang mới</h2>
    <a href="javascript:void(0)" onclick ="$('#light_adct').hide();$('#fade_adct').hide()"><img src="<?php echo img_link('close.png', 'admin'); ?>" class="png" /></a>
</div>

<div id="div_message"></div>

<form enctype="multipart/form-data" method="post" action="<?php echo action_link('add'); ?>" id="html_form">
<div class="editcate_ct">
	<div class="btarticle">
    	<input type="button" value="Cancel" class="btn" onclick="$('#light_adct').hide();$('#fade_adct').hide();" />
        <input type="submit" value="Save & Continute" class="btn" />
    </div>
	<div class="boxadd">
    	<ul class="linect">     	   	
            <li>
                <span class="left"><b>Tiêu đề<font color="red">(*)</font> :</b></span>
                <span class="right"><input type="text" name="txt_title" value="" style="width:100%; margin:0;" /></span>
            </li>
                      
            <li>
                <b>Nội dung:<font color="red">(*)</font></b>
            </li>
            <li>
                <span class="right"><textarea id="txt_content" name="txt_content"  style="width:100%; height:200px;"></textarea></span>
                <script type="text/javascript">
				$(function() {				    				    
				    $('#news_form').iframer({
				        onComplete: function(msg){
				        	if(msg == 'yes') {
				        		$('#light_adct').hide();$('#fade_adct').hide();
				        		var reload_link = '<?php echo action_link('index?cat_id='); ?>'+$('[name=cat_id]').val();
				        		if(window.location.href == reload_link) {
				        			load_content('list', window.location.href, true);
				        		}
				        		else {
				        			window.location.href = reload_link;	
				        		}
				        	}
				        	else show_error('div_message', msg)
				        }
				    });
				    
					if(CKEDITOR.instances['txt_content']) {						
						CKEDITOR.remove(CKEDITOR.instances['txt_content']);
					}
					CKEDITOR.config.width = 504;
				    CKEDITOR.config.height = 400;
					CKEDITOR.replace('txt_content',{
				    	toolbar :
				    		[['Source','Maximize','-','Format','Font','FontSize'],'/',
					         ['TextColor','BGColor','-','Bold','Italic','Underline'],
					         ['NumberedList','BulletedList'],'/',
					         ['Outdent','Indent','Blockquote'],
					         ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
					         ['Image','Table','-', 'Link', 'Unlink' ]]
					});
				})
				</script>                
            </li>            
       		<li>
       			<span class="left"><b>Trạng thái:</b></span>
       			 <span class="right">
                    <select style="width:130px;" name="status" id="status">
                      <option value="yes" style="color: blue;">Kích hoạt</option>
                      <option value="no" style="color: red;">Chưa kích hoạt</option>
                    </select>
                </span>
       		</li>
       		
        </ul>
    </div>
    <div class="btarticle">
    	<input type="button" value="Cancel" class="btn" onclick="$('#light_adct').hide();$('#fade_adct').hide();" />
        <input type="submit" value="Save & Continute" class="btn" />

    </div>
</div>
</form>
<script>
$('#html_form').iframer({
    onComplete: function(msg){
    	if(msg == 'yes') {
    		$('#light_adct').hide();$('#fade_adct').hide();
            load_content('html_list', window.location.href, true);
    	}
    	else show_error('div_message', msg)
    }
});
</script>